package com.bfxy.rabbit.task.autoconfigure;

import com.bfxy.rabbit.task.entity.RabbitTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 测试SPI
 * @author linxin
 */
@Slf4j
@Configuration
public class MyConfiguration {

    @Bean
    public RabbitTask method1(){
        RabbitTask rabbitTask = new RabbitTask();
        rabbitTask.setId("11");
        rabbitTask.setName("测试任务");
        log.info("初始化method1method1");
        return rabbitTask;
    }
    //@Bean
    public void method2(){
        log.info("初始化method2");
    }
}
